Skip to content

Conversation

@ovflowd
Copy link
Member

@ovflowd ovflowd commented Feb 10, 2026

This is a hot-fix due to a TS import happening on non-TS files...

@ovflowd ovflowd requested a review from a team as a code owner February 10, 2026 12:21
Copilot AI review requested due to automatic review settings February 10, 2026 12:21
@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Feb 10, 2026 0:22am

Request Review

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 72.50000% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.02%. Comparing base (4e47b88) to head (a46613f).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/site/next.fetch.mjs 71.05% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8615      +/-   ##
==========================================
+ Coverage   74.95%   75.02%   +0.06%     
==========================================
  Files         103      103              
  Lines        9063     9068       +5     
  Branches      312      315       +3     
==========================================
+ Hits         6793     6803      +10     
+ Misses       2268     2263       -5     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hotfix to prevent TypeScript-only utility imports from being used by non-TS (ESM .mjs) build/runtime scripts by relocating the fetchWithRetry helper into an ESM module and updating callers.

Changes:

  • Removed the TypeScript fetchWithRetry helper (apps/site/util/fetch.ts).
  • Added an ESM-compatible retrying fetch helper (apps/site/next.fetch.mjs).
  • Updated .mjs modules/generators to import fetchWithRetry from the new ESM module.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/site/util/fetch.ts Removes the TS implementation to avoid TS imports from non-TS contexts.
apps/site/next.fetch.mjs Introduces ESM fetchWithRetry implementation with retry/backoff options.
apps/site/next.calendar.mjs Updates import to use the new ESM fetch helper.
apps/site/next-data/generators/vulnerabilities.mjs Updates import to use the new ESM fetch helper.
apps/site/next-data/generators/supportersData.mjs Updates import to use the new ESM fetch helper.
apps/site/next-data/generators/majorNodeReleases.mjs Updates import to use the new ESM fetch helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const sleep = ms => new Promise(r => setTimeout(r, ms));

/**
* Does a fetch with retry logic for network errors and timeouts.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring says this retries on “network errors and timeouts”, but the implementation only retries when isTimeoutError(e) is true (ETIMEDOUT via e.cause.code). Either update the documentation to match current behavior or broaden the retry condition to include the intended network-error cases.

Suggested change
* Does a fetch with retry logic for network errors and timeouts.
* Does a fetch with retry logic for timeout errors (as determined by `isTimeoutError`).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total Size 3.74 MB
New Total Size 3.74 MB
Delta -16.00 B (-0.00%)

Changes

➕ Added Assets (2)
Name Size
.next/static/chunks/68a088d3b3973eca.js 136.17 KB
.next/static/chunks/bb744cfd4d4b1c8f.js 207.00 KB
➖ Removed Assets (2)
Name Size
.next/static/chunks/889b7d8319bf6eea.js 136.18 KB
.next/static/chunks/a0d76cf182c7f413.js 207.00 KB

@ovflowd ovflowd merged commit 5f82476 into main Feb 10, 2026
20 checks passed
@ovflowd ovflowd deleted the fix/fixed-fetch-retry branch February 10, 2026 12:29
@ovflowd
Copy link
Member Author

ovflowd commented Feb 10, 2026

cc @nodejs/nodejs-website fast-tracking as urgent main bugfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant